// 这里封装的是对 mysql 的操作
const mysql = require("mysql");
const connection = mysql.createConnection({
  host: "192.168.0.63",
  user: "root",
  password: "123123",
  database: "firday-store",
});
connection.connect();

function data(sql, dataArr, backFun) {
  connection.query(sql, dataArr, function (err, rows, fields) {
    backFun(err, rows, fields);
  });
}
// connection.end();
module.exports = { data };
